
set more off 

	foreach model in Baselineprice Price_PVirrad Price_angle early_adopters ///
	Producing Importing Netimport LaggedIV ///
		NSincome  Heterotemp Temp_ddsq Tempghi  Weekendinc Hour_income  {

use Results/Andrea/`model'_elasticity.dta, clear
	
	
** collapse and make an area graph when have all the results
	collapse (mean) consumption_elasticity export_elasticity (sd) ///
	consumption_elasticity_sd = consumption_elasticity export_elasticity_sd = export_elasticity, by(PVlevel hour)

	foreach var in consumption_elasticity export_elasticity {
	gen `var'_high = `var' + 1.96*`var'_sd
	gen `var'_low  = `var' - 1.96*`var'_sd
	}


	
	twoway (rarea consumption_elasticity_high consumption_elasticity_low hour if PVlevel==1, color(gs10)  lcolor(gs10)) ///
	(rarea consumption_elasticity_high consumption_elasticity_low hour if PVlevel==2 , color(bluishgray%80))  ///
	(rarea consumption_elasticity_high consumption_elasticity_low hour if PVlevel==3, color(eltgreen%60) )  /// 
	(connected consumption_elasticity hour if PVlevel==1, lcolor(gs8) msymbol(none) lpattern(dash) lwidth(thin)) ///
	(connected consumption_elasticity hour if PVlevel==2 , lcolor(edkblue)  msymbol(none) lpattern(shortdash) lwidth(thin) )  ///
	(connected consumption_elasticity hour if PVlevel==3, lcolor(teal)  msymbol(none) lpattern(solid) lwidth(thin) lwidth(thin)),  /// 
	legend(order(4 "Low production" 5 "Medium production" 6 "High production") region(style(none) lcolor(none))) ///
	 ytitle("Consumption elasticity")  graphregion(color(white)) ///
	xscale(range(0 23))  xlabel(0(4)20)
graph export Results/Andrea/`model'_consumptionelasticity.pdf, replace




	twoway (rarea export_elasticity_high export_elasticity_low hour if PVlevel==1, color(gs10) lcolor(gs10) ) ///
	(rarea export_elasticity_high export_elasticity_low hour if PVlevel==2 , color(bluishgray%80) lcolor(bluishgray))  ///
	(rarea export_elasticity_high export_elasticity_low hour if PVlevel==3, color(eltgreen%60) lcolor(eltgreen))  /// 
	(connected export_elasticity hour if PVlevel==1, lcolor(gs8) msymbol(none)  lpattern(dash) lwidth(thin) ) ///
	(connected export_elasticity hour if PVlevel==2 , lcolor(edkblue)  msymbol(none) lpattern(shortdash) lwidth(thin) )  ///
	(connected export_elasticity hour if PVlevel==3, lcolor(teal)  msymbol(none) lpattern(solid) lwidth(thin)) if hour>=6 & hour<=18,  /// 
	legend(order(4 "Low production" 5 "Medium production" 6 "High production") region(style(none) lcolor(none))) ///
	 ytitle("Export elasticity")  graphregion(color(white)) ///
	xscale(range(6 18)) xlabel(6(3)18)
graph export Results/Andrea/`model'_exportelasticity.pdf, replace

													}
